 package xin.petstore.framework.utils;
 
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
 import org.dozer.DozerBeanMapper;
 
 public class BeanMapper
 {
   private static DozerBeanMapper dozer = new DozerBeanMapper();
 
   public static <T> T map(Object source, Class<T> destinationClass)
   {
     return dozer.map(source, destinationClass);
   }
 
   public static <T> List<T> mapList(Collection sourceList, Class<T> destinationClass)
   {
     List destinationList = new ArrayList();
     for (Iterator localIterator = sourceList.iterator(); localIterator.hasNext(); ) { Object sourceObject = localIterator.next();
       Object destinationObject = dozer.map(sourceObject, destinationClass);
       destinationList.add(destinationObject);
     }
     return destinationList;
   }
 
   public static void copy(Object source, Object destinationObject)
   {
     dozer.map(source, destinationObject);
   }
 }

/* Location:           C:\java代码反编译器\core-1.1.4.jar
 * Qualified Name:     com.eloancn.framework.utils.BeanMapper
 * JD-Core Version:    0.6.0
 */